package com.shiyou.boke.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

//三层架构里面（控制层、服务层、持久层）
//@Controller 控制器，Mvc   m
@RestController //没有视图层，返回的数据json数据

@RequestMapping("/test/")
public class TestController {

    @RequestMapping("test")
//    @GetMapping("test") 查询
//    @PostMapping("test") 提交数据
    public Object test() {
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("name", "zhangsan");
        objectObjectHashMap.put("sex", "nv");
        objectObjectHashMap.put("age", 19);
        return objectObjectHashMap;
    }


}
